public class User {

    private String account;
    private String password;
    private String email;

    public User(String account, String password) {
        this.account = account;
        this.password = password;
        this.email = "";
    }

    public User(String account, String password, String email) {
        this.account = account;
        this.password = password;
        this.email = email;
    }

    public void outout() {
        System.out.println("账号: " + account);
        System.out.println("密码: " + password);
        if (!email.isEmpty()) {
            System.out.println("邮箱: " + email);
        } else {
            System.out.println("邮箱: 未填写");
        }
    }

    public static void main(String[] args) {
        User user1 = new User("张三", "123456", "123456@qq.com");
        User user2 = new User("李四", "888888");


        user1.outout();
        System.out.println();

        user2.outout();
    }
}
